/*
 * CorrectWWIcon.java
 * 
 * Created on Jun 13, 2007, 7:50:30 AM
 * 
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.oslo.ui.util;

import gov.nasa.worldwind.UserFacingIcon;
import gov.nasa.worldwind.geom.Position;

/**
 *
 * @author nl24167
 */
public class CorrectWWIcon extends UserFacingIcon {

    public CorrectWWIcon(String val, Position pos) {
        super(val, pos);
    }
    
   public int hashCode() {
        int hash = 7;
        hash = 29 * hash + (int)this.getPosition().getLatitude().getDegrees() + (int)this.getPosition().getLatitude().getDegrees();
        return hash;
    }
    

    public boolean equals(Object obj) {
        
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        
        final CorrectWWIcon other = (CorrectWWIcon) obj;
        if (!(other.getPosition().getLatitude().degrees == this.getPosition().getLatitude().degrees)) {
            return false;
        }
        if (!(other.getPosition().getLongitude().degrees == this.getPosition().getLongitude().degrees)) {
            return false;
        }
       
        return true;
    }       
    
    

}
